import os
import simsym
import symtypes
import errno
import model
import signal
import ptypes
import HardwareRegisters

class Lock(simsym.tstruct(
		hw = HardwareRegisters.HardwareRegisters
		)):
	def _declare_assumptions(self, assume):
		super(Lock, self)._declare_assumptions(assume)
	
	@model.methodwrap(hwrgs = HardwareRegisters.HardwareRegisters)
	def INIT(self, hwrgs):
		self.hw = hwrgs
	
	@model.methodwrap()
	def Lock(self):
		self.hw.SetIntsOff
	
	@model.methodwrap()
	def Unlock(self):
		self.hw.SetIntsOn

model_class = Lock
